
function formatDate(date: number | Date | undefined){
    return new Intl.DateTimeFormat('zh-cn', {
        weekday: 'long'}
    ).format(date)
}
// {}使用Javascript变量、文本、属性
export default function Avatar() {
    const avatar = 'https://i.imgur.com/7vQD0fPs.jpg'
    const description = 'Gregorio Y. Zara'
    const name = 'Gregorio Y. Zara'
    return (
        <div>
           <img
        className="avatar"
        src={avatar}
        alt={description}
        />
        <h1>{name}'s To Do List</h1> 
        <h1>To Do List for {formatDate(new Date())}</h1>
        </div>
    )
}